//
//  NewShouYiInfoViewController.m
//  wangzhe
//
//  Created by 李 佳伟 on 2018/3/15.
//  Copyright © 2018年 李 佳伟. All rights reserved.
//

#import "NewShouYiInfoViewController.h"
#import "JTCSM.h"
#import "MyInfoView.h"
#import "MyDoubleLabelView.h"

@interface NewShouYiInfoViewController ()
{
    CGFloat myinfoHeight ;
}
@property (nonatomic,strong) MyDoubleLabelView *doubleView;
@end

@implementation NewShouYiInfoViewController


- (void)gotBack{
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    self.navigationController.navigationBar.hidden = NO;
    
}
- (void)viewDidLoad {
    [super viewDidLoad];
    [df isRemoveTarbar:YES];
    self.navigationController.navigationBar.hidden = NO;
    self.view.backgroundColor =[UIColor whiteColor];
    leftBarButtonItems_rightBarButtonItems *leftbtn = KCUSTOMNAVIGSTION_ALLOC;
    self.navigationItem.leftBarButtonItem = [leftbtn setBarButtonItemsImageName:@"fanhui.png" frame:KLeftBarButtonItemFrame_image target:self SEL:@selector(gotBack)];
    // Do any additional setup after loading the view.
    myinfoHeight = 50;
    [self layoutsubViews];
}

- (void)layoutsubViews{
    CGFloat headerHeight = 136*[JTCSMSingle shareSingle].adaptationNumber;
    CGRect rect = [df labelHeightWithContent:@"测试数据" width:1500 font:15];
    CGFloat imagesize = rect.size.height+5;
    CGFloat space = 10;
    CGFloat buttonSpace = (KCONTROLLERWith-imagesize-rect.size.width-space)/2;
    UIButton *titleButton = [UIButton buttonWithType:UIButtonTypeCustom];
    titleButton.frame = CGRectMake(buttonSpace, 23*[JTCSMSingle shareSingle].adaptationNumber, rect.size.width+space+imagesize, imagesize);
    [titleButton setTitle:@"交易收益" forState:UIControlStateNormal];
    titleButton.titleLabel.font = [UIFont systemFontOfSize:15];
    [titleButton setTitleColor:[df colorWithHexString:@"666666" alpha:1] forState:UIControlStateNormal];
    [titleButton setImage:[UIImage imageNamed:@"交易收益详情.png"] forState:UIControlStateNormal];
    titleButton.imageEdgeInsets = UIEdgeInsetsMake(0, 0, 0, titleButton.LC_width-imagesize);
    titleButton.titleEdgeInsets = UIEdgeInsetsMake(0, -imagesize-2*space, 0, 0);
    [self.view addSubview:titleButton];
    
    self.doubleView = [[MyDoubleLabelView alloc]initWithFrame:CGRectMake(0, KVIEW_Y(titleButton), KCONTROLLERWith, headerHeight-23*[JTCSMSingle shareSingle].adaptationNumber-titleButton.LC_height) titleFontsize:32 titlecolor:[UIColor blackColor] contentFontsize:13 contentcolor:[df colorWithHexString:@"999999" alpha:1]];
    [self.view addSubview:self.doubleView];
    [self.doubleView InsertSpacesetvalueWithModel:@{KDoubleLabelTitle:@"188.82",KDoubleLabelContent:@"收益金额"} changeLabelY:10*[JTCSMSingle shareSingle].adaptationNumber];
    
    NSArray *array = @[@"订单金额",@"手续费",@"收款方式",@"商品说明",@"收款分类"];
   
    MyInfoView *view1;
    for (int i = 0; i < array.count; i++) {
        view1 = [[MyInfoView alloc]initWithFrame:CGRectMake(0,headerHeight+myinfoHeight*i, KCONTROLLERWith, myinfoHeight) imagename:nil title:array[i]placeholder:nil isShowLabel:(i==array.count-1)?ImageandlabelViewType:labelType radioBtnIndex:0 GroupId:@""];
        view1.tag = 100+i;
        view1.userInteractionEnabled = YES;
        [df addTapGestureRecognizerWithTarget:self action:@selector(gotoVC:) andaddView:view1];
        [self.view addSubview:view1];
    }
    [df newlineViewWithHeightofTop:KVIEW_Y(view1)+10 superView:self.view spacing:0 color:RGBACOLOR(241, 241, 241, 1) lineHeight:10];
    NSArray *array1 = @[@"订单号",@"创建时间"];
    
    for (int i = 0; i < array1.count; i++) {
        view1 = [[MyInfoView alloc]initWithFrame:CGRectMake(0,headerHeight+(myinfoHeight*array.count)+10+myinfoHeight*i, KCONTROLLERWith, myinfoHeight) imagename:nil title:array1[i]placeholder:nil isShowLabel:labelType radioBtnIndex:0 GroupId:@""];
        view1.tag = 100+i;
        view1.userInteractionEnabled = YES;
        [df addTapGestureRecognizerWithTarget:self action:@selector(gotoVC:) andaddView:view1];
        [self.view addSubview:view1];
    }
}

- (void)gotoVC:(UITapGestureRecognizer *)tap{
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
